env = Environment()
#env.Program(target = 'foo', source = 'foo.c')

SConscript('http/SConstruct')
SConscript('util/SConstruct')
SConscript('certificate/SConstruct')


# Tell SCons to create our build files in the 'build' directory
VariantDir('build', 'src', duplicate=0)

# Set our source files
source_files = ['FingerprintManager.cpp','FirefoxAddonUpdater.cpp','FirefoxUpdater.cpp','HTTPSBridge.cpp','Logger.cpp','SessionCache.cpp','SSLBridge.cpp','SSLConnectionManager.cpp','sslsniff.cpp','UpdateManager.cpp']

# Set our required libraries
libraries = ['boost_thread','log4cpp','ssl','crypto','protobuf','boost_system','boost_filesystem', 'pthread', 'util', 'http', 'certificate', 'crypto']
#lprotobuf -lboost_system -lpthread -lssh2 util/libutil.a webserver/libwebserver.a -lmicrohttpd -lcrypto
library_paths = ['util/', 'certificate/','http/']

env = Environment()

env.Append( CPPFLAGS=['-c', '-g','--static'] )


#env.StaticLibrary('util', source_files)
# Tell SCons the program to build
env.Program('main', source_files, LIBS = libraries, LIBPATH = library_paths)


